<?php
require_once 'application/library/config/gcConfigRegistry.php';
require_once 'application/library/controller/gcLBasicAction.php';
require_once 'application/modules/example/constant/exampleTemplatName.php';

/**
 * framework用共通
 * exampleSortableController
 * @author    Founder
 * @version   1.0
 * @exclude   作  成  日：2010/08/11
 */
class example_exampleSortableController extends gcLBasicAction{

    /**
     *
     * Enter description here ...
     * @var unknown_type
     */
    private $service;

    /**
     * indexAction
     * @return
     */
    public function indexAction(){
        $this->setPageInfo();
        $this->gcView->render(exampleTemplatName::EXAMPLESORTABLE);
    }

    /**
     * searchAction
     * @return
     */
    public function searchAction(){
        if($this->getRequest()->isXmlHttpRequest()){
            $goodsno    = $this->getParam("goodsno");
            $goodsname  = "";
            switch($goodsno){
                case "001":
                    $goodsname = "りんご";
                    break;
                case "002":
                    $goodsname = "オレンジ";
                    break;
                case "003":
                    $goodsname = "もも";
                    break;
            }

            $output = array("goodsno"=>$goodsno, "goodsname"=>$goodsname);
            jsonHelper::outPutJson($output);
        }else{}
    }

    /**
     *
     * Enter description here ...
     */
    private function setPageInfo(){
    }
}
